﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BackOffice.Master" AutoEventWireup="true" CodeBehind="Member_Maintenance.aspx.cs" Inherits="FYPDemo.Member_Maintenance" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
    <tr>
        <td>
            <asp:Label ID="lblName" runat="server" Text="Name"></asp:Label>
        </td>
        <td>
            <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
        </td>
            
        <td>
            <asp:Label ID="lblStatus" runat="server" Text="Status"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="ddlStatus" runat="server">
                <asp:ListItem Value="1">Normal</asp:ListItem>
                <asp:ListItem Value="2">Blocked</asp:ListItem>
            </asp:DropDownList>
        </td>
    </tr>

    <tr>
        <td>
            <asp:Label ID="lblRole" runat="server" Text="Role"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="ddlRole" runat="server">
                <asp:ListItem Value="1">Admin</asp:ListItem>
                <asp:ListItem Value="2">Member</asp:ListItem>
                <asp:ListItem Value="3">Supplier</asp:ListItem>
            </asp:DropDownList>
        </td>

        <td>
            <asp:Label ID="lblEmail" runat="server" Text="Email"></asp:Label>
        </td>
        <td>
            <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
        </td>
    </tr>

    <tr>
        <td>
            <asp:Label ID="lblDateRegistered" runat="server" Text="Registered Date"></asp:Label>
        </td>
        <td>
            <asp:TextBox ID="txtDateRegistered" runat="server"></asp:TextBox>
            <asp:CalendarExtender ID="CalendarExtender1" runat="server" 
            Enabled="true" TargetControlID="txtDateRegistered"
            Format="yyyy-MM-dd">
            </asp:CalendarExtender>
         </td>
    </tr>

    <tr>
        <td colspan="4" align="right">
            <asp:Button ID="btnCheck" runat="server" Text="Check" 
                onclick="btnCheck_Click" />
        </td>
    
    </tr>
</table>



<asp:GridView ID="Member_Maintenance_Grid" runat="server" CellPadding="4" 
        ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" DataKeyNames="Name" OnRowCommand="MemberMaintenance_Command">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
            <asp:TemplateField HeaderText = "No.">
                <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Member">
                <ItemTemplate>
                    <asp:LinkButton ID="lbName" runat="server" Text='<%#Eval("Name") %>'
                    CommandArgument = "<%# ((GridViewRow) Container).RowIndex  %>" CommandName = "Name" ></asp:LinkButton>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Email">
                <ItemTemplate>
                    <asp:Label ID="lblEmailAddress" runat="server"><%#Eval("EmailAddress") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Phone">
                <ItemTemplate>
                    <asp:Label ID="lblPhone" runat="server"><%#Eval("Phone") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Registered Date">
                <ItemTemplate>
                    <asp:Label ID="lblDateCreated" runat="server"><%#Eval("DateCreated") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Status">
                <ItemTemplate>
                    <asp:Label ID="lblStat" runat="server"><%#Eval("Status") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Reward Point">
                <ItemTemplate>
                    <asp:Label ID="lblRewardPoint" runat="server"><%#Eval("RewardPoint") %></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            
        </Columns>
    <EditRowStyle BackColor="#7C6F57" />
    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#E3EAEB" />
    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
    <SortedAscendingCellStyle BackColor="#F8FAFA" />
    <SortedAscendingHeaderStyle BackColor="#246B61" />
    <SortedDescendingCellStyle BackColor="#D4DFE1" />
    <SortedDescendingHeaderStyle BackColor="#15524A" />
</asp:GridView>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
</asp:Content>

